package com.anli.web;

import com.anli.xianliu2.Xianliu2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.TimeUnit;

/**
 * @author: LI-CI-GAO
 * 作者: licigao
 * 日期: 2021/8/29  21:53
 * 描述:
 */
@RestController
public class TestXIanLiu2 {

    @Autowired
    private RedisTemplate<String,Object> redisTemplate;

    @RequestMapping("xianliu2")
    @Xianliu2(value = 2)
    public void test005(){

        System.out.println("================================");

    }


    @RequestMapping("ceshi")
    public void test006(){

        redisTemplate.opsForValue().set("zhangsan","88888888888");

        redisTemplate.expire("zhangsan",10,TimeUnit.SECONDS);

        System.out.println("================================");



    }




}
